package com.cems.pojo;

import com.cems.util.DateUtil;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * @ClassName ForumComment
 * @Author 陈新予(blank)
 * @Date 2021/5/18
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ForumComment {
    private int id;
    private int artId;
    private int commUser;
    private String commData;
    private String gmtCreate;

    public void setGmtCreate(Object gmtCreate) {
        if (gmtCreate instanceof Date) {
            this.gmtCreate = new DateUtil().dateToString((Date) gmtCreate);
        } else {
            this.gmtCreate = (String) gmtCreate;
        }
    }
}
